package com.dxyxx.db;

import android.database.ContentObserver;
import android.os.Handler;
import android.util.Log;

/**
 * 针对所有的监听写一个公有类，传入参数，Uri badgeView context
 * 
 * @author chinesejie
 * 
 */
public class ShoppingCarContentObserver extends ContentObserver {

	private Handler mHandler; //更新UI线程  

	public ShoppingCarContentObserver(Handler handler) {
		super(handler);
		this.mHandler = handler;
	}

	@Override
	public boolean deliverSelfNotifications() {
		return super.deliverSelfNotifications();
	}

	private static String TAG = "ShoppingCarContentObserver";

	@Override
	public void onChange(boolean selfChange) {
		Log.i(TAG, "the sms table has changed");
		// 通知更新
		mHandler.sendEmptyMessage(0);
	}

}
